package com.bwie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bwie.pojo.Room;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface RoomMapper extends BaseMapper<Room> {

    @Select("SELECT r.*,s.status_name,t.type_name FROM room as r LEFT JOIN `status` as s on r.status_id = s.id LEFT JOIN type as t on r.type_id = t.id ORDER BY r.status_id")
    Page<Room> pageList(Page<Room> roomPage);
}
